﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace WcfService1
{

    [ServiceContract]
    public interface IIndoorMapService
    {


        [WebGet(UriTemplate = "Map/", ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        IndoorPositionMap RetrieveMapData();

    }

    [DataContract]
    public class IndoorPositionMap
    {
        [DataMember]
        public List<AccessPoint> AccessPoints { get; set; }

        [DataMember]
        public IndoorStructure StructureInformation { get; set; }

        [DataMember]
        public String ImageData { get; set; }

        [DataMember]
        public String DSLScript {get;set;}

    }

    [DataContract]
    public class IndoorStructure
    {

        [DataMember]
        public List<Wall> Walls { get; set; }

    }

    [DataContract]
    public class Wall
    {
        [DataMember]
        public Position StartPosition { get; set; }
        [DataMember]
        public Position EndPosition { get; set; }

    }

    [DataContract]
    public class AccessPoint
    {
        [DataMember]
        public string MACAddress { get; set; }
        [DataMember]
        public Position Location { get; set; }

    }

    [DataContract]
    public class Position
    {
        [DataMember]
        public double X { get; set; }
        [DataMember]
        public double Y { get; set; }

    }


}
